// TOWN DIALOGUE SCRIPT
//    Town 57: Lair of Sulfras

begintalkscript;

variables;

short i,j,k,r1,choice;

// Sulfras

begintalknode;
	tag = 40;
	state = -1;
	nextstate = 1;
	question = "Sulfras";
	text1 = "You stand quaking before a dragon, the largest, mightiest and rarest of beasts. She inspects you carefully. She sniffs the air. _Ah. Avernite. Not Empire. I will spare you, for a time._";
	text2 = "_I am Sulfras._ Her words are slow and thoughful. _I have waited for one of your kind._ When she speaks you see a multitudes of massive, viciously sharp teeth.";
	text5 = "Sulfras takes a long breath. When she exhales, the thick sulphurous gas makes you gag. _What else do you need, mortal?_";
	action = INTRO;

begintalknode;
	state = 1;
	nextstate = -1;
	condition = gf(57,11) == 0;
	question = "_Greetings, dragon. May I speak with you?_";
	text1 = "_I have led the return of the dragons to the surface world. We must build proper lairs. We are hunted. I am very busy. Yet, you can be of use to me. I have allowed you to enter so that we can speak of important matters._";
	action = SET_SDF 57 11 1;

begintalknode;
	state = 1;
	nextstate = 3;
	condition = gf(57,11) >= 1;
	question = "_Why have you returned to the surface?_";
	text1 = "_The foul humans of the Empire slew many of our kind and dispersed the rest. I wish to lead our triumphant return to the surface and to exact a grim vengeance on the Empire._";
	text2 = "_This leads me the important matters we must discuss._";

begintalknode;
	state = 1;
	nextstate = 2;
	condition = gf(57,11) >= 1;
	question = "_There is much that I would like to know._";
	text1 = "_All right. My siblings and I wish to discuss an important issue with you. If teaching you of dragonkind will help, I will. But do not take long. Though my lifespan is unending, my time, at present, is limited._";

begintalknode;
	state = 2;
	nextstate = 5;
	question = "_How many dragons are left?_";
	text1 = "_I don't know. The Empire dispersed us. Only three dragons are here: me, and my surviving siblings, Athron and Khoth. There are more of us, though, and one by one I will find them and bring them here._";

begintalknode;
	state = 5;
	nextstate = -1;
	question = "_You said 'surviving' siblings. Do you have dead siblings?_";
	text1 = "_Pyrog and Motrax. I do not speak of them. The last few years have not been good for my kind._";

begintalknode;
	state = 5;
	nextstate = -1;
	question = "_Tell me of Athron._";
	text1 = "_My sister, Athron, has recently had a brood of dragonlings. She is uninterested in our war._ Sulfras looks irritated. _I hope her paranoia will disperse and she will join the fight. She must see that she has no choice._";

begintalknode;
	state = 5;
	nextstate = 6;
	question = "_Tell me of Khoth._";
	text1 = "_Khoth's wisdom is infinite, and his hatred of the humans is almost as great as mine._";

begintalknode;
	state = 6;
	nextstate = -1;
	question = "_Why do you hate humans so much?_";
	text1 = "She exhales a small warning puff of flame. _You have not yet earned the right to ask our motives._";
	
begintalknode;
	state = 3;
	nextstate = 4;
	question = "_What important matter?_";
	text1 = "_It has come to our attention that we have fallen under the suspicions of the Avernites. Some Avernites believe that we are responsible for the plagues of monsters on the surface._";

begintalknode;
	state = 4;
	nextstate = 12;
	question = "_Should we suspect you?_";
	text1 = "She chuckles dryly. _Some Avernites believe we have caused the plagues of monsters that beset the world. We did not. Our vengeance against the Empire has not yet begun._";
	text2 = "_The enemy of our enemy is our friend. That is why we wish to reassure Avernum. Also, we wish to enlist your help._";


begintalknode;
	state = 12;
	nextstate = 4;
	question = "_When will your vengeance commence?_";
	text1 = "She glares at you. _Do not ask._";

begintalknode;
	state = 4;
	nextstate = 7;
	question = "_How can I help?_";
	text1 = "_We wish your aid in dealing with certain irksome pests._";

begintalknode;
	state = 7;
	nextstate = -1;
	condition = gf(57,7) == 0;
	question = "_What pests are those?_";
	text1 = "_First, go to the northeast cave of my lair. Enter it, and deal with the pests within. When you have slain them, come back and ask me of them again._";
	action = SET_SDF 57 17 1;
	code =
		toggle_quest(75,1);
	break;
	
begintalknode;
	state = 9;
	nextstate = -1;
	condition = gf(57,7) <= 1;
	question = "_What sort of sword do you wish to make?_";
	code =
		run_hardcode(164);
	break;

begintalknode;
	state = 1;
	nextstate = 9;
	condition = gf(57,9) >= 1 && gf(57,17) > 0 && gf(57,7) == 0;
	question = "_I killed a beast in the northeast caves._";
	text1 = "_Then you see, these 'alien beasts,' as the humans call them, are mildly annoying. We know you fight the monsters. We have had difficulties with them. I wish to make you a sword you can use to exterminate them._";

begintalknode;
	state = 1;
	nextstate = -1;
	condition = gf(57,7) == 1;
	question = "_Can you make the special sword yet?_";
	code =
		run_hardcode(164);
	break;

begintalknode;
	state = 1;
	nextstate = -1;
	condition = gf(309,1) >= 1;
	question = "_I found dragon scales in the Filth Factory. Did your kind create it?_";
	text1 = "_You found dragon scales there? And what of it? You think it is impossible to find dragon scales? I'm sure that there are plenty of them in my old lair in Avernum._";
	text2 = "_No, we did not create the place of which you speak._";

begintalknode;
	state = 2;
	nextstate = -1;
	condition = gf(57,11) >= 1 && gf(57,12) >= 1;
	question = "_May I enter your private chambers? The hidden ones to the south?_";
	text1 = "Sulfras is annoyed. _You pitiful creatures dare to make such an insolent request? You should be honored that I will help you as much as I will, and not devour you on the spot._";

begintalknode;
	state = 1;
	nextstate = -1;
	condition = gf(57,11) >= 1;
	question = "_Can you teach me any magic?_";
	text1 = "Sulfras frowns. _You humans. Avernum. Empire. It's all the same. You want, and you take. See Khoth. He will sell such baubles. I do not waste my time._";

begintalknode;
	state = 1;
	nextstate = 10;
	condition = gf(57,9) >= 1 && gf(57,7) >= 1;
	question = "_Who created the alien beasts?_";
	text1 = "_I don't know. I would tell you if I did. They are very troublesome creatures. They constantly burrow into our lair. It takes an effort to slay them._";

begintalknode;
	state = 10;
	nextstate = 11;
	question = "_Where did they come from?_";
	text1 = "_They just appeared. They were first seen near the Keep of Tinraya, a human city to the north. Within months, the whole province was lost to them._";
	text2 = "_The foolish humans walled in the diseased area. As if that will save them._";

begintalknode;
	state = 11;
	nextstate = -1;
	question = "_Do you know how to pass the wall?_";
	text1 = "_No. I have no interest in going there. If you want to pass the wall, you should speak to those who made it. They are in a human castle called, I believe, Blackcrag. It is to the northeast._";

begintalknode;
	state = 1;
	nextstate = 20;
	condition = gf(57,7) > 1;
	question = "_I want more assistance._";
	text1 = "Now Sulfras is angry. The stress of forging the blade left her in a foul temper. _I gave you a gift. The gift of a dragon. Do you realize how rare that is? You will leave now, and pester me no more._";
	
begintalknode;
	state = 20;
	nextstate = -1;
	condition = 1;
	question = "_Sorry. Never mind._";
	text1 = "_You have all I will give. Leave me._ She waves you away.";
	action = END_TALK;
	
begintalknode;
	state = 20;
	nextstate = -1;
	condition = 1;
	question = "_I'm not asking, worm. Give me some of your hoard, or pay._";
	text1 = "Sulfras rises up. _Little fool. You were not worthy of my aid. I will take my gift back and give it to someone worthy. Someone who knows how to show respect._";
	text2 = "She rapidly grows unhinged. _All I have ... You humans ... Held me ... You dare. I swore ... Never submit to you again! Ever!_";
	action = END_TALK;
	code =
		set_attitude(5709,10);
	break;
	
begintalknode;
	state = 1;
	nextstate = -1;
	condition = gf(57,11) >= 1;
	question = "_That is all I need._";
	text1 = "_Then leave me. Our great work is just beginning._";
	action = END_TALK;

